package org.jimmy.tang.designpattern.structure.component;

import java.util.List;

/**
 * @author jimmy
 * 
 */
public class Test {
    public static void main(String[] args) {
        Employer pm = new ProjectManager("Project Manager");
        Employer pa = new ProjectAssistant("Project Assistant");
        Employer programmer1 = new Programmer("Programmer1");
        Employer programmer2 = new Programmer("Programmer2");

        pm.add(pa);//
        pm.add(programmer1);//
        pm.add(programmer2);

        List<Employer> ems = pm.getEmployers();
        for (Employer em : ems) {
            System.out.println(em.getName());
        }
    }

}
